try
{

function OnCurrentOnline()
{
  
}

function FaceonlineChrome()
{
  alert("load!");
}

/*
var customEvent = document.createEvent('Event');
customEvent.initEvent('myCustomEvent', true, true);

var myCustomEventDiv = document.getElementById("FaceonlineEvent");
myCustomEventDiv.innerText = "hello world";
myCustomEventDiv.dispatchEvent(customEvent);
*/

var port = chrome.extension.connect({name: "faceonlinePort"});

var eventSiteList = document.createEvent('Event');
eventSiteList.initEvent('eventSiteList', true, true);

//chrome.extension.onConnect.addListener(function(port) {
port.onMessage.addListener(function(msg) {
  try{
    var myCustomEventDiv = document.getElementById("event-income-sites");
    myCustomEventDiv.innerText = JSON.stringify(msg.values);
    myCustomEventDiv.dispatchEvent(eventSiteList);
  }
  catch(e)
  {
    //DISPATCH_REQUEST_ERR
    // alert("faceonline-content:" + e.message);
  }

});

//})

}
catch(e)
{
  alert(e.message);
}




